{% extends 'base.html' %}
{% load static %}

{% block title %}{{ action_title }} - 资产操作{% endblock %}

{% block content %}
<div class="container py-4">
  <nav aria-label="breadcrumb">
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="{% url 'assets:index' %}">首页</a></li>
      <li class="breadcrumb-item"><a href="{% url 'assets:asset_detail' asset.pk %}">资产详情</a></li>
      <li class="breadcrumb-item active" aria-current="page">{{ action_title }}</li>
    </ol>
  </nav>

  {% if messages %}
  <div class="mb-3">
    {% for message in messages %}
      <div class="alert alert-{{ message.tags }} mb-2" role="alert">{{ message }}</div>
    {% endfor %}
  </div>
  {% endif %}

  <div class="card shadow-sm">
    <div class="card-header d-flex align-items-center">
      <strong class="me-2">{{ action_title }}</strong>
      <span class="text-muted">资产：{{ asset.name }}（编号：{{ asset.asset_number }}）</span>
    </div>
    <div class="card-body">
      <form method="post">
        {% csrf_token %}
        <!-- 占位：这里可放表单字段，如选择目标部门/人员等 -->
        <p class="text-muted">此为占位页面。提交后仅记录成功消息并返回/停留。</p>

        <div class="d-flex gap-2">
          <a class="btn btn-outline-secondary" href="{% url 'assets:asset_detail' asset.pk %}">返回详情</a>
          <button type="submit" class="btn btn-primary">提交</button>
        </div>
      </form>
    </div>
  </div>
</div>
{% endblock %}
